package com.ruoyi.project.system.partymember.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.partymember.mapper.PartyRelationshipChangeMapper;
import com.ruoyi.project.system.partymember.domain.PartyRelationshipChange;
import com.ruoyi.project.system.partymember.service.IPartyRelationshipChangeService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 党员组织关系变动服务实现类
 * 
 * @author ruoyi
 * @date 2023-07-15
 */
@Service
public class PartyRelationshipChangeServiceImpl implements IPartyRelationshipChangeService 
{
    @Autowired
    private PartyRelationshipChangeMapper partyRelationshipChangeMapper;

    /**
     * 查询党员组织关系变动
     * 
     * @param id 党员组织关系变动主键
     * @return 党员组织关系变动
     */
    @Override
    public PartyRelationshipChange selectPartyRelationshipChangeById(Long id)
    {
        return partyRelationshipChangeMapper.selectPartyRelationshipChangeById(id);
    }

    /**
     * 查询党员组织关系变动列表
     * 
     * @param partyRelationshipChange 党员组织关系变动
     * @return 党员组织关系变动
     */
    @Override
    public List<PartyRelationshipChange> selectPartyRelationshipChangeList(PartyRelationshipChange partyRelationshipChange)
    {
        return partyRelationshipChangeMapper.selectPartyRelationshipChangeList(partyRelationshipChange);
    }

    /**
     * 新增党员组织关系变动
     * 
     * @param partyRelationshipChange 党员组织关系变动
     * @return 结果
     */
    @Override
    public int insertPartyRelationshipChange(PartyRelationshipChange partyRelationshipChange)
    {
        partyRelationshipChange.setCreateTime(DateUtils.getNowDate());
        return partyRelationshipChangeMapper.insertPartyRelationshipChange(partyRelationshipChange);
    }

    /**
     * 修改党员组织关系变动
     * 
     * @param partyRelationshipChange 党员组织关系变动
     * @return 结果
     */
    @Override
    public int updatePartyRelationshipChange(PartyRelationshipChange partyRelationshipChange)
    {
        return partyRelationshipChangeMapper.updatePartyRelationshipChange(partyRelationshipChange);
    }

    /**
     * 批量删除党员组织关系变动
     * 
     * @param ids 需要删除的党员组织关系变动主键
     * @return 结果
     */
    @Override
    public int deletePartyRelationshipChangeByIds(Long[] ids)
    {
        return partyRelationshipChangeMapper.deletePartyRelationshipChangeByIds(ids);
    }

    /**
     * 删除党员组织关系变动信息
     * 
     * @param id 党员组织关系变动主键
     * @return 结果
     */
    @Override
    public int deletePartyRelationshipChangeById(Long id)
    {
        return partyRelationshipChangeMapper.deletePartyRelationshipChangeById(id);
    }
}